b8a46d
@@ -1166,8 +1166,13 @@
public class HConnectionManager {
     throws IOException {
       if (master) getMaster();
       HRegionInterface server;
-      String rsName = isa != null?
-          isa.toString(): Addressing.createHostAndPortStr(hostname, port);
+      String rsName = null;
+      if (isa != null) {
+        rsName = Addressing.createHostAndPortStr(isa.getHostName(),
+            isa.getPort());
+      } else {
+        rsName = Addressing.createHostAndPortStr(hostname, port);
+      }
       // See if we already have a connection (common case)
       server = this.servers.get(rsName);
       if (server == null) {
@@ -1190,7 +1195,8 @@
public class HConnectionManager {
                   serverInterfaceClass, HRegionInterface.VERSION,
                   address, this.conf,
                   this.maxRPCAttempts, this.rpcTimeout, this.rpcTimeout);
-              this.servers.put(address.toString(), server);
+              this.servers.put(Addressing.createHostAndPortStr(
+                  address.getHostName(), address.getPort()), server);
             } catch (RemoteException e) {
               LOG.warn("RemoteException connecting to RS", e);
               // Throw what the RemoteException was carrying.
